package com.example.workrecord.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Entity
@Data
@Table(name="my_platform")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModel(description = "展览主表")
@EntityListeners(AuditingEntityListener.class)
public class PlatForm implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue()
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "展览名称")
    private String  name;
    @ApiModelProperty(value = "简称")
    private String  shortName;
    @ApiModelProperty(value = "简称")
    private String  units;
    @ApiModelProperty(value = "简称")
    private String  researchField;
    @ApiModelProperty(value = "行业")
    private String  industry;
    @ApiModelProperty(value = "联系人")
    private String  linkName;
    @ApiModelProperty(value = "联系人手机")
    private String  linkMob;
    @ApiModelProperty(value = "联系人邮箱")
    private String  linkEmail;
    @ApiModelProperty(value = "介绍")
    private String  introduce;
    @ApiModelProperty(value = "简称")
    private String  researchData;
    @ApiModelProperty(value = "创建人")
    private String  createUser;
    @ApiModelProperty(value = "状态")
    private Integer  status;
    @ApiModelProperty(value = "类别")
    private Integer  category;
    @ApiModelProperty(value = "排序")
    private Long  hOrder;

    @ApiModelProperty(value = "类型")
    private Integer  categoryType;

    @ApiModelProperty(value = "图标")
    private String  logUrl;

    @Transient
    @ApiModelProperty(value="子表")
    private List<PlatFormb> platFormbs;

    /**
     * 分页游标
     */
    @Transient
    @ApiModelProperty(value = "分页游标")
    private Integer offset;


    /**
     * 分页大小
     */
    @ApiModelProperty(value = "分页大小")
    @Transient
    private Integer limit;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "create_time",updatable = false,nullable = false)
    private Date createTime;

    /**
     * 修改时间
     */
    @LastModifiedDate
    @Column(name = "modify_time",nullable = false)
    private Date modifyTime;



}
